/**
 * Created by WhiteBlue on 15/3/4.
 */
$(document).ready(function () {
    $('.am-alert').alert();
    $("#login").on("click", function () {
            $.post($('#href0').val(), {
                pw: $("#pw_field").val()
            }, function (data) {
                if (data.msg == '1') {
                    parent.document.location.href = $('#href1').val();
                } else {
                    $('#pw_field').addClass("am-form-error");
                }
            }).error(function () {
                $('#pw_field').addClass("am-form-error");
            });
    });
});
